#ifndef NAME_MENU
#define NAME_MENU

//includes
#include <gtkmm/drawingarea.h>
#include <gtkmm/builder.h>
#include <gdk/gdkkeysyms.h>
#include <cairomm/context.h>
#include <sigc++/sigc++.h>
#include <dirent.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <vector>
#include <string>

//defines
#define LEFT_BORDER 20
#define RIGHT_BORDER 20
#define TOP_BORDER 20
#define BOTTOM_BORDER 20

//namespace
using namespace std;

//class prototypes----------------------
class nameMenu;

//nameMenu-------------------------------

class nameMenu : public Gtk::DrawingArea {
public:
    //contructors-------
    nameMenu(BaseObjectType* obj, const Glib::RefPtr<Gtk::Builder>& window);
    nameMenu();
    ~nameMenu();
    //load functions----
    void loadDirectory(string dirname, string filetype = "");
    void addNames(string str);
    //draw functions----
    void buttonPress(GdkEventKey* e);
    void draw();
    void keypress(GdkEventKey* event);
    //signals-----------
    sigc::signal<void, string>* enterSignal();
    string gChoice();
protected:
    //handlers----------
    virtual bool on_button_press(GdkEventButton* btn);
    virtual bool on_key_press_event(GdkEventKey* event);
    virtual bool on_expose_event(GdkEventExpose *event);
private:

    sigc::signal<void, string> entersig;

    int choice;
    int offset;
    vector<string*> names;
	string fileType;
	string fileHeader;
};
#endif
